package top.minuy.algorithm.sort.select;

import top.minuy.util.constant.SortType;
import top.minuy.util.generate.ArrayGenerator;
import top.minuy.util.helper.SortingHelper;
/**
 * @author Minuy
 * @time 11:50
 * @date 2021/8/21
 */
public class Test {
    public static void main(String[] args) {

        int[] dataSize = {10,100,1000,10000,100000};

        Integer[] arrT = {1,3,2,6,9,10};
        SelectSort.sort(arrT);
        System.out.println("选择排序算法1");
        for (Integer i : arrT){
            System.out.print(i+" ");
        }
        System.out.println();

        Integer[] arrT2 = {1,3,2,6,9,10};
        SelectSort.sort2(arrT2);
        System.out.println("选择排序算法2");
        for (Integer i : arrT2){
            System.out.print(i+" ");
        }
        System.out.println();

        for(int n:dataSize) {
            Integer[] arr = ArrayGenerator.generateRandomArray(n,n);
            SortingHelper.SortTest(SortType.SelectSort2, arr);
        }
    }
}
